package com.wan37.logic.task.domain.vo;

import com.wan37.logic.task.domain.entity.TaskDO;

/**
 * @author : luoyong
 * @date : 2020-08-08 10:31
 **/
public class TaskVO {
    private String userId;
    private String taskParentType;
    private String taskSonType;
    private String taskId;
    private long total;
    public TaskVO(){}

    public TaskVO(TaskDO taskDO) {
        this.userId = taskDO.getUserId();
        this.taskParentType = taskDO.getTaskParentType();
        this.taskSonType = taskDO.getTaskSonType();
        this.taskId = taskDO.getTaskId();
        this.total = taskDO.getTotal();
    }

    public TaskVO(TaskConfigVO taskConfigVO, String userId) {
        this.taskParentType = taskConfigVO.getTaskParentType();
        this.taskId = taskConfigVO.getTaskId();
        this.taskSonType = taskConfigVO.getTaskSonType();
        this.userId = userId;
        this.total = 0;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getTaskParentType() {
        return taskParentType;
    }

    public void setTaskParentType(String taskParentType) {
        this.taskParentType = taskParentType;
    }

    public String getTaskSonType() {
        return taskSonType;
    }

    public void setTaskSonType(String taskSonType) {
        this.taskSonType = taskSonType;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    @Override
    public String toString() {
        return "TaskVO{" +
                "userId='" + userId + '\'' +
                ", taskParentType='" + taskParentType + '\'' +
                ", taskSonType='" + taskSonType + '\'' +
                ", taskId='" + taskId + '\'' +
                ", total='" + total + '\'' +
                '}';
    }
}
